<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function fu(){
            var input1 = document.getElementById('num1');
            var input2 = document.getElementById('num2');
            var input3 = document.getElementById('num3');
            var num1 = input1.value;
            num1 = Number(num1);
            var num2 = input2.value;
            num2 = Number(num2);
            var num3 = num1 + num2;
            num3 = Number(num3);
            input3.value = num3;
        }
        function fu1(){
            var c1 = document.getElementById('c1');
            var c2 = document.getElementById('c2');
            var Fahrenheit = c1.value;
            var c = 5/9*(Fahrenheit-32);
            c = c.toFixed(3);
            c2.value = c;
        }
        function shi(){
            var shi = document.getElementById('sj1');
            var er = document.getElementById('e');
            var shij = shi.value;
            // shij = Number(shij);
            console.log(shij);
            er.value = parseInt(shij,8);
           
        }        
    </script>
</head>
<body>
    <input type="text" name="num1" id="num1">+
    <input type="text" name="num2" id="num2">
    <button onclick="fu()">=</button>
    <input type="text" name="num3" id="num3">
    <br><br>
    请输入华氏度
    <input type="text" name="num1" id="c1">℃
    <button onclick="fu1()">转换成摄氏度</button>
    <input type="text" name="num3" id="c2">℉
    <br><br>
    er进制转shi进制
    <input type="text" id="sj1">
    <button onclick="shi()">=</button>
    <input type="text" id="e">
</body>
</html>